import request from '@/api/request.js'

// 获取订单列表
export function getOrderList(page = 1, limit = 10) {
    return request.get(`/order?page=${page}&limit=${limit}`)
}

// 获取订单详情
export function getOrderDetail(id) {
    return request.get(`/order/order-detail/${id}`)
}

// 创建订单
export function createOrder(data) {
    return request.post('/order', data)
}

// 删除订单
export function deleteOrder(id) {
    return request.delete(`/order/${id}`)
}

// 修改订单
export function updateOrder(id, data) {
    return request.put(`/order/${id}`, data)
}
